#!/bin/bash
work_dir="/opt/soft/myonlineddl"                                  #工作目录
. ${work_dir}/function/log/f_logging.sh
if [ -f "${work_dir}/conf/myonlineddl.conf" ]
then
    . ${work_dir}/conf/myonlineddl.conf
fi

log_addr='${BASH_SOURCE}:${FUNCNAME}:${LINENO}' #eval echo ${log_addr}

mysql_comm_dbadb="mysql --default-character-set=utf8 -u${mysql_user} -p${mysql_pass} -h${dbadb_host} -P${dbadb_port} ${dbadb_db}"

hook_tmp="${work_dir}/hook/tmp"
log_addr='${BASH_SOURCE}:${FUNCNAME}:${LINENO}' #eval echo ${log_addr}

function f_main()
{
    mkdir -p ${hook_tmp}
    f_logging "$(eval echo ${log_addr}):INFO" "rowcount-complete schema:${GH_OST_DATABASE_NAME}.${GH_OST_TABLE_NAME} before_row : ${GH_OST_ESTIMATED_ROWS}"
    echo "${GH_OST_ESTIMATED_ROWS}" > ${hook_tmp}/${GH_OST_DATABASE_NAME}.${GH_OST_TABLE_NAME}.txt
}

f_main
